#define _CRT_SECURE_NO_WARNINGS 1
#pragma once

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

typedef int HPDateType;

struct Heap
{
	HPDateType* a;
	int size;
	int capacity;
};
typedef struct Heap  HP;

//  HP* HeapInit(HPDateType* a, int n);
void Swap(HPDateType* a, HPDateType* b);
void AdjustDown(HPDateType* a, int n, int parent);
void AdjustUp(HPDateType* a, int child);
void HeapInit(HP* php, HPDateType* a, int n);
void HeapDestroy(HP* php);
void HeapPush(HP* php, HPDateType x);
void HeapPop(HP* php);
HPDateType HeapTop(HP* php);
int HeapSize(HP* php);
bool HeapEmpty(HP* php);
void HeapPrintf(HP* php);

